<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Users_model extends CI_Model{
    const TBL_U='users';
          function __construct(){
           parent::__construct();
          $this->load->database();
          }
    function queryU($arr){
        $query=$this->db->get_where(self::TBL_U,$arr);
    return $query->result();
     }
     function queryAll(){
       $query=$this->db->get(self::TBL_U);
       return $query->result();
     }
    function updateData($arr,$tables=self::TBL_U){
    	$data=array('login_time'=>time());
    	$this->db->where($arr);
    	return $this->db->update($tables,$data);
    }
     
}